package com.cx.demo;

import com.cx.demo.bean.Byebye;
import com.cx.demo.bean.Hello;
import com.cx.demo.configure.BeanConfigure;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author xiongmin
 * @version 1.0
 * @date 20-8-19 下午2:11
 */
public class IocApp2 {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(BeanConfigure.class);

        Hello hello = ctx.getBean(Hello.class);

        Byebye byebye = ctx.getBean(Byebye.class);

        hello.sayHello();

        byebye.sayHello();
    }

}


